import Vue from 'vue'
import Router from 'vue-router'
 
 
// 解决重复点击导航路由报错
// const originalPush = Router.prototype.push;
// Router.prototype.push = function push(location) {
//   return originalPush.call(this, location).catch(err => err);
// }


Vue.use(Router)

export default new Router({
  routes: [
  	{
      path: '/',
      redirect: '/home'
    },
    {
      path: '/home',
      name: 'home',
      meta:{
        index:0
      },
      component: ()=>import('../pages/home/index')
    },
    {
      path: '/money',
      name: 'money',
      meta:{
        index:1
      },
      component: ()=>import('../pages/money/index')
    },
    {
      path: '/ious',
      name: 'ious',
      meta:{
        index:2
      },
      component: ()=>import('../pages/ious/index')
    },
    {
      path: '/raise',
      name: 'raise',
      meta:{
        index:3
      },
      component: ()=>import('../pages/raise/index')
    },
    {
      path: '/my',
      name: 'my',
      meta:{
        index:4
      },
      component: ()=>import('../pages/my/index')
    }
  ]
})